@model List<NavigatableNode>
@{ Ajax.Dna().Widget()
       .UserPreferences(widget =>
       {
           var vd = new ViewDataDictionary();
           vd["widget"] = widget;
           Html.RenderPartial("_LinkEditor", Model, vd);
       })
       .Content(@<text>
    @if (Model != null)
    {
        <ul style="list-style: none none outside; margin: 3px; padding: 0px;">
            @foreach (var link in Model)
            {
                <li style="clear: left;height:25px;"><a style="padding: 3px" href="@link.NavigateUrl" target="_blank">
                    <img src="@Url.Content("~/content/images/icon_link_16.png")" alt="@link.ToolTip" class="d-icon" />
                    @if (string.IsNullOrEmpty(link.Text))
                    {
                        @link.NavigateUrl
                    }
                    else
                    { 
                        @link.Text
                    }</a> </li>
            }
        </ul>
    }
    </text>)
       .Preview(@<text>
    <ul style="list-style: none none outside; margin: 3px; padding: 0px;">
        <li style="clear: left;"><a style="padding: 3px" href="javascript:void(0);">
            <img src="@Url.Content("~/content/images/icon_link_16.png")" alt="link1" class="d-link" />
            Link item1 </a></li>
        <li style="clear: left;"><a style="padding: 3px" href="javascript:void(0);">
            <img src="@Url.Content("~/content/images/icon_link_16.png")" alt="link1" class="d-link" />
            Link item2 </a></li>
        <li style="clear: left;"><a style="padding: 3px" href="javascript:void(0);">
            <img src="@Url.Content("~/content/images/icon_link_16.png")" alt="link1" class="d-link" />
            Link item3 </a></li>
    </ul>
    </text>)
       .Render();
}
